package com.gaojiawei.multiThread15_CopyOnWriteArrayList;

import java.util.concurrent.CopyOnWriteArrayList;

public class L02_CopyOnWriteArrayListAdd {
    public static void main(String[] args) {
        CopyOnWriteArrayList<Object> objects = new CopyOnWriteArrayList<>();
        objects.add(1);
        objects.add(2);objects.add(3);objects.add(4);
        System.out.println(objects);

        objects.add(1,99);
        objects.add(4,99);
        System.out.println(objects);
    }
}
